#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_add_clicked()
{
    float tmp = this->windowOpacity();
    if(tmp>=1.0)
    {
        return;
    }
    tmp+=0.1;
    this->setWindowOpacity(tmp);
}

void Widget::on_pushButton_down_clicked()
{
    float tmp = this->windowOpacity();
    if(tmp<=0)
    {
        return;
    }
    tmp-=0.1;
    this->setWindowOpacity(tmp);
}
